﻿using Microsoft.AspNetCore.Mvc;
using UpperComputer.Application;
using YFurion.Application;

namespace UpperComputer.Web.Entry.Controllers
{
    /// <summary>
    /// 操作日志控制器
    /// </summary>
    [ApiDescriptionSettings(ApiGroupConst.SYSTEM_LOG)]
    public class AuditLogController : AuthorizeController
    {
        private readonly IAuditLogService _auditLogService;

        /// <summary>
        /// 操作日志控制器构造函数
        /// </summary>
        /// <param name="auditLogService">操作日志服务</param>
        public AuditLogController(
            IAuditLogService auditLogService
         )
        {
            _auditLogService = auditLogService;
        }

        public async Task<PagedResultDto<AuditLogDto>> Get([FromQuery] AuditLogResultRequestDto auditLogResultRequestDto)
        {
            PagedResultDto<AuditLogDto> pagedResultDto = await _auditLogService.GetAll(auditLogResultRequestDto);
            return pagedResultDto;
        }
    }
}
